package com.chexiehui.jc.mvp.home;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BaseView;
import com.chexiehui.jc.entity.HomeMenuResultInfo;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 首页
 * @Auth SongJun
 * @Date 2019/11/20 10:05
 **/
public interface HomePageCovenant {

    interface View extends BaseView {
        void onGeMenuDataSuccess(BaseModel<HomeMenuResultInfo> successResult);

        void onGetMenuDataFailure(BaseModel<Object> failureResult);

    }

    interface Stores {
        @FormUrlEncoded
        @POST(Constants.URL_HOME_MENU_DATA)
        Observable<BaseModel<HomeMenuResultInfo>> getMenuData(
                @Field("timespan") String timespan);

    }

    interface Presenter {
        void getMenuData();

    }

}